<%@page import="com.core.utils.LocalizableString"%>
<%@page import="com.entities.projectteam.actionscript.ActionScriptParserTeamMemberAdd"%>
<%@page import="com.entities.projectteam.list.TeamMemberListController"%>
<%@page import="com.core.utils.GlobalConstants"%>
<%@page import="com.entities.projecttask.actionscript.ActionScriptParserProjectTaskAdd"%>
<%@page import="com.core.ui.controller.ActionBarController"%>
<%@page import="com.core.managers.SessionManager"%>
<%@taglib prefix="sorokina" uri="/WEB-INF/Sorokina.tld"%>
<%
	LocalizableString localizableString = LocalizableString.sharedInstance();
	String confirm = LocalizableString.sharedInstance().localizable("tabsheet.team.teammemberslist.confirm.delete");
%>
<script type="text/javascript">
    function deleteTeamMember(taskId){
        var confirmResult = confirm("<%=confirm%>");
        if (confirmResult){

            jQuery.post('<%=GlobalConstants.SERVLET_TEAMMEMBERDELETE%>',
                    {'id'        : taskId}
                    ,function(data){
                        location.reload();
                    }
            );

        }
    }
</script>
<%
	SessionManager.setContext(GlobalConstants.USERCONTEXT_TEAMMEMBER);
    SessionManager.addContext(GlobalConstants.USERCONTEXT_TEAMMEMBERLIST);
    String projectId = request.getParameter("id");

    TeamMemberListController listController = new TeamMemberListController();
    listController.setProjectId(projectId);

    ActionScriptParserTeamMemberAdd actionScriptParser = new ActionScriptParserTeamMemberAdd();
    actionScriptParser.setProjectId(projectId);

    ActionBarController actionBarController = new ActionBarController();
    actionBarController.setActionScriptParser(actionScriptParser);
%>

<div>

    <sorokina:ActionBarView datasource="<%=actionBarController %>" />
    <sorokina:TableView datasource="<%=listController%>" delegate="<%=listController%>" />
</div>